package com.aiyan.edu.api.cms;

import com.aiyan.edu.framework.domain.cms.CmsConfig;
import com.aiyan.edu.framework.domain.cms.CmsPage;
import com.aiyan.edu.framework.domain.cms.CmsSite;
import com.aiyan.edu.framework.domain.cms.request.QueryPageRequest;
import com.aiyan.edu.framework.domain.cms.request.QuerySiteRequest;
import com.aiyan.edu.framework.domain.cms.response.CmsPageResult;
import com.aiyan.edu.framework.domain.cms.response.CmsSiteResult;
import com.aiyan.edu.framework.model.response.QueryResponseResult;
import com.aiyan.edu.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * @author: zqzhou
 * @create: 2019/10/17 21:56
 **/
@Api(value = "cms站点管理接口", description = "cms站点管理接口，提供站点数据的增删改查")
public interface CmsSiteControllerApi {

    /**
     * 按条件分页查询页面数据
     *
     * @param page             页码
     * @param size             每页数据条数
     * @param querySiteRequest 查询条件
     * @return
     */
    @ApiOperation("分页查询站点列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page", value = "页码", required = true, paramType = "path", dataType = "int"),
            @ApiImplicitParam(name = "size", value = "每页数据条数", required = true, paramType = "path", dataType = "int")
    })
    public QueryResponseResult findList(int page, int size, QuerySiteRequest querySiteRequest);

    /**
     * 添加站点
     *
     * @param cmsSite 站点数据
     * @return 新增结果
     */
    @ApiOperation("添加站点")
    public CmsSiteResult add(CmsSite cmsSite);

    /**
     * 查询站点
     *
     * @param id 站点id
     * @return 站点数据
     */
    @ApiOperation("通过ID查询站点")
    @ApiImplicitParam(name = "id", value = "站点id", required = true, paramType = "path", dataType = "String")
    public CmsSiteResult findById(String id);

    /**
     * 修改站点
     *
     * @param id
     * @param cmsSite
     * @return
     */
    @ApiOperation("修改站点")
    @ApiImplicitParam(name = "id", value = "站点id", required = true, paramType = "path", dataType = "String")
    public CmsSiteResult update(String id, CmsSite cmsSite);

    /**
     * 删除站点
     *
     * @param id
     * @return
     */
    @ApiOperation("删除站点")
    @ApiImplicitParam(name = "id", value = "站点id", required = true, paramType = "path", dataType = "String")
    public ResponseResult delete(String id);
}
